/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.stop.manage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.stop.common.constant.enums.ParkStopSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 停车场进出纪录
 *
 * @author pig
 * @date 2024-02-19 16:31:35
 */
@Data
@TableName("closed_drive_stop_access_record")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "停车场进出纪录")
public class ClosedDriveStopAccessRecordEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


    /**
     * 标识
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "标识")
    private Long id;

    /**
     * 企业名称
     */
    @Schema(description = "企业名称")
    private Long companyId;

    /**
     * 运单号
     */
    @Schema(description = "运单号")
    private String waybillNumber;

    /**
     * 进出时间
     */
    @Schema(description = "进出时间")
    private LocalDateTime accessDate;

    /**
     * 方向
     */
    @Schema(description = "方向")
    private Long direction;

    /**
     * 车牌号
     */
    @Schema(description = "车牌号")
    private String plateNumber;

    /**
     * 车主姓名
     */
    @Schema(description = "车主姓名")
    private String driver;

    /**
     * 车主电话
     */
    @Schema(description = "车主电话")
    private String driverPhone;

    /**
     * 押运员姓名
     */
    @Schema(description = "押运员姓名")
    private String supercargo;

    /**
     * 押运员电话
     */
    @Schema(description = "押运员电话")
    private String supercargoPhone;

    /**
     * 卡口名称
     */
    @Schema(description = "卡口名称")
    private Long mouthName;

    /**
     * 机构ID
     */
    @Schema(description = "机构ID")
    private Long orgId;

    public String getDirectionStr() {
        return DictResolver.getItemLabelByValue(ParkStopSysDictEnum.car_direction, this.direction);

    }

    public String getCompanyIdStr() {
        return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.companyId);

    }

}
